﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using yq.ControllerBase;

namespace Demo.Controllers
{
    public class HomeController : BaseController
    {
        //
        // GET: /Home/

        public ActionResult Error500(string errorGuid = "")
        {
            string errorText = "";
            if (string.IsNullOrEmpty(errorGuid) || TempData[errorGuid] == null)
            {
                errorText = "未定义错误原因,请在方法上定义错误提示";
            }
            else
            {
                errorText = TempData[errorGuid].ToString();
                ViewData.Model = errorText;
            }
            return View();
        }

        public ActionResult Error404()
        {
            return View();
        }

    }
}
